#ifndef ERROR_REPORTER_H
#define ERROR_REPORTER_H

enum ErrorClassID { ERRORCLS_COMMENT, ERRORCLS_WARNING, ERRORCLS_ERROR };

enum ErrorMessageID {
	// Front End
	ERRORMSG_NEUTRAL,
	ERRORMSG_PROGRAM_START,
	ERRORMSG_PROGRAM_NUMBER,
	ERRORMSG_BLOCK_EMPTY,
	ERRORMSG_BLOCK_SKIPPED,
	ERRORMSG_PROGRAM_END,
	ERRORMSG_PROGRAM_END_UNEXPECTED,
	// Parser
	ERRORMSG_BLOCK_EXPECTED,
	ERRORMSG_NUMBER_EXPECTED,
	ERRORMSG_TOO_MANY_DIGITS,
	ERRORMSG_EOL_UNEXPECTED,
	ERRORMSG_ADDRESS_EXPECTED,
	ERRORMSG_TOO_MANY_ERRORS,
	// Scanner
	ERRORMSG_UNKNOWN_CHAR,
	ERRORMSG_DIGIT_EXPECTED,
	ERRORMSG_EOF_UNEXPECTED,
	
};

struct ErrorReporter
{
	virtual void report(ErrorClassID errClsID,
		ErrorMessageID errMsgID = ERRORMSG_NEUTRAL,
		const char *message = "",
		unsigned int row = 0,
		unsigned int col = 0) = 0;
	virtual bool errorsExceeded() = 0;
	virtual bool warningsExceeded() = 0;
};

#endif
